﻿using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using VioletDevelopmentLaboratory.Net.Web;
using VioletDevelopmentLaboratory.Net.Web.Component;

public partial class vboard_component_board_template_searchresult_default_list_sub_information : BoardSearchSubPartBase
{
	protected void Page_Load(object sender, EventArgs e)
	{

	}

	protected String getTemplateInfomationHtml()
	{
		String templateName = this.Page.Items["Template"].ToString() ?? "default";

		System.Xml.XPath.XPathDocument xdoc = new System.Xml.XPath.XPathDocument(String.Format(System.IO.Path.Combine(VUtility.WebApplicationPhysicalPath, @"vboard\component\board\template_search\{0}\author.xml"), templateName));

		System.Xml.XPath.XPathNavigator xnav = xdoc.CreateNavigator();

		String name = xnav.SelectSingleNode("author/name").Value;
		String contact = xnav.SelectSingleNode("author/url").Value;
		String version = xnav.SelectSingleNode("author/version").Value;
		String description = xnav.SelectSingleNode("author/description").Value;

		return String.Format(VUtility.GetVWebGlobalResource("General_Script_AuthorInfo"),
			"Template", name, contact, version, description);
	}

	protected String getStylesheetInformationHtml()
	{
		String stylesheetName = this.Page.Items["Stylesheet"].ToString() ?? "default";

		System.Xml.XPath.XPathDocument xdoc = new System.Xml.XPath.XPathDocument(String.Format(System.IO.Path.Combine(VUtility.WebApplicationPhysicalPath, @"vboard\component\board\stylesheet_search\{0}\author.xml"), stylesheetName));

		System.Xml.XPath.XPathNavigator xnav = xdoc.CreateNavigator();

		String name = xnav.SelectSingleNode("author/name").Value;
		String contact = xnav.SelectSingleNode("author/url").Value;
		String version = xnav.SelectSingleNode("author/version").Value;
		String description = xnav.SelectSingleNode("author/description").Value;

		return String.Format(VUtility.GetVWebGlobalResource("General_Script_AuthorInfo"),
			"Stylesheet", name, contact, version, description);
	}

	protected String getSearchInfomationHtml()
	{
		return String.Format(
			VUtility.GetVWebGlobalResource("Search__Script_Info"),
			GetLocalResourceObject("Info_Symbol_Text"),
			String.Format("<div><img src=\"{0}\" alt=\"\" />&nbsp;{1}&nbsp;&nbsp;<img src=\"{2}\" alt=\"\" />&nbsp;{3}&nbsp;&nbsp;<img src=\"{4}\" alt=\"\" />&nbsp;{5}&nbsp;&nbsp;<img src=\"{6}\" alt=\"\" />&nbsp;{7}&nbsp;&nbsp;<img src=\"{8}\" alt=\"\" />&nbsp;{9}&nbsp;&nbsp;<img src=\"{10}\" alt=\"\" />&nbsp;{11}</div><div><img src=\"{12}\" alt=\"\" />&nbsp;{13}&nbsp;&nbsp;<img src=\"{14}\" alt=\"\" />&nbsp;{15}&nbsp;&nbsp;<img src=\"{16}\" alt=\"\" />&nbsp;{17}&nbsp;&nbsp;<img src=\"{18}\" alt=\"\" />&nbsp;{19}&nbsp;&nbsp;<img src=\"{20}\" alt=\"\" />&nbsp;{21}&nbsp;&nbsp;<img src=\"{22}\" alt=\"\" />&nbsp;{23}</div>",
				ResolveClientUrl(GetLocalResourceObject("Symbol_Stress_Normal_ImageUrl").ToString()),
				GetLocalResourceObject("Symbol_Stress_Normal_Text"),
				ResolveClientUrl(GetLocalResourceObject("Symbol_Stress_Today_ImageUrl").ToString()),
				GetLocalResourceObject("Symbol_Stress_Today_Text"),
				ResolveClientUrl(GetLocalResourceObject("Symbol_Stress_New_ImageUrl").ToString()),
				GetLocalResourceObject("Symbol_Stress_New_Text"),
				ResolveClientUrl(GetLocalResourceObject("Symbol_Stress_Hot_ImageUrl").ToString()),
				GetLocalResourceObject("Symbol_Stress_Hot_Text"),
				ResolveClientUrl(GetLocalResourceObject("Symbol_Stress_Secret_ImageUrl").ToString()),
				GetLocalResourceObject("Symbol_Stress_Secret_Text"),
				ResolveClientUrl(GetLocalResourceObject("Symbol_Stress_Anno_ImageUrl").ToString()),
				GetLocalResourceObject("Symbol_Stress_Anno_Text"),
				ResolveClientUrl(GetLocalResourceObject("Symbol_Att_Link_ImageUrl").ToString()),
				GetLocalResourceObject("Symbol_Att_Link_Text"),
				ResolveClientUrl(GetLocalResourceObject("Symbol_Att_File_ImageUrl").ToString()),
				GetLocalResourceObject("Symbol_Att_File_Text"),
				ResolveClientUrl(GetLocalResourceObject("Symbol_Att_Flash_ImageUrl").ToString()),
				GetLocalResourceObject("Symbol_Att_Flash_Text"),
				ResolveClientUrl(GetLocalResourceObject("Symbol_Att_Image_ImageUrl").ToString()),
				GetLocalResourceObject("Symbol_Att_Image_Text"),
				ResolveClientUrl(GetLocalResourceObject("Symbol_Att_Audio_ImageUrl").ToString()),
				GetLocalResourceObject("Symbol_Att_Audio_Text"),
				ResolveClientUrl(GetLocalResourceObject("Symbol_Att_Video_ImageUrl").ToString()),
				GetLocalResourceObject("Symbol_Att_Video_Text")
			),
			GetLocalResourceObject("Info_WebBrowser_Text"),
			"<script type=\"text/javascript\">document.write(navigator.userAgent);</script>"
		);
	}
}
